package cn.gson.school.dao.qiantai;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import cn.gson.school.entity.jiaoxue.TeamStudentEntity;

public interface TeamStudentDao extends CrudRepository<TeamStudentEntity, Long> {
	/*查询组长身份*/
	@Query(nativeQuery = true, value="select a.* from (team_student a,tb_jx_teams b) where a.team_id=b.team_id and a.studentinfo_id = ?1 order by b.team_create_time desc")
	List<TeamStudentEntity> findByStudentId(Long stuid);
	
	List<TeamStudentEntity> findByTeamId(Long teamId);
}
